feat: Added in-memory storage for testing purposes#59
feat: Added in-memory storage for testing purposes#59Harshdev098 wants to merge 2 commits intolightningdevkit:mainfrom
Conversation
|
👋 Thanks for assigning @tankyleo as a reviewer! |
tnull
left a comment
There was a problem hiding this comment.
Thanks for looking into this!
Generally goes into the right direction, but we def. need to avoid re-allocating everything on every operation.
4980a75 to
25d57e3
Compare
|
@tnull Have done the required changes |
tnull
left a comment
There was a problem hiding this comment.
Looks much better, but I think we still need to handle global_version properly, even if we're currently not using it client-side.
|
🔔 1st Reminder Hey @tankyleo! This PR has been waiting for your review. |
25d57e3 to
9012e95
Compare
9012e95 to
3b434d0
Compare
|
@tankyleo Can you please review it! |
|
🔔 3rd Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
🔔 4th Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
🔔 5th Reminder Hey @tankyleo! This PR has been waiting for your review. |
rust/impls/src/in_memory_store.rs
Outdated
| version: record.version, | ||
| }), | ||
| }) | ||
| } else if request.key == GLOBAL_VERSION_KEY { |
There was a problem hiding this comment.
Looks like by the time we are here, we know the GLOBAL_VERSION_KEY does not have a value, otherwise guard.get would have returned Some previously. We can just return the GetObjectResponse below directly with version: 0.
There was a problem hiding this comment.
@Harshdev098 double checking things here, we still have this second branch the same as before ?
There was a problem hiding this comment.
Shouldn't we still return early if request.key == GLOBAL_VERSION_KEY rather than always first making the lookup?
There was a problem hiding this comment.
The first lookup handles cases where the GLOBAL_VERSION_KEY is some non-zero value. We want to check whether it's been set to some value in the map before returning the initial value in this branch.
3b434d0 to
e0c31bb
Compare
|
@tankyleo Have done with the required changes! Can you please review it |
8003119 to
5898609
Compare
tnull
left a comment
There was a problem hiding this comment.
When testing integration with LDK Node locally I found that the tests are currently failing. I now opened #62 to add LDK Node integration tests to our CI here. It would be great if that could land first, and we could also add a CI job for the in-memory store as part of this PR then, ensuring the implementation actually works as expected.
|
🔔 1st Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
🔔 2nd Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
@Harshdev098 Please rebase now that #62 landed to make use of the new CI checks here. |
|
🔔 22nd Reminder Hey @tankyleo! This PR has been waiting for your review. |
257c45b to
749c0ea
Compare
tankyleo
left a comment
There was a problem hiding this comment.
Thanks for the rebase !
Can you squash the 3rd commit into the 1st commit ? Let's ship the improved version in a single commit.
Also CI is failing can you take a look ? Thank you
| [[bin]] | ||
| name = "vss-server" | ||
| path = "src/main.rs" |
There was a problem hiding this comment.
Help me understand I don't think we need this ?
|
Will take a deeper look this week at the code |
f870179 to
ba0d247
Compare
@Harshdev098 can you do this one ? Thank you |
e30765f to
687efd7
Compare
|
@tankyleo Have squashed those commits |
| [[bin]] | ||
| name = "vss-server" | ||
| path = "src/main.rs" No newline at end of file |
There was a problem hiding this comment.
@Harshdev098 before I take a deeper look can you explain this one ? It doesn't seem necessary.
There was a problem hiding this comment.
Actually earlier the CI test are failing for not finding a bin or something like that, but now have reverted does changes!
6050d90 to
1c937bd
Compare
1c937bd to
4fc9d0f
Compare
|
🔔 1st Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
🔔 2nd Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
🔔 3rd Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
🔔 4th Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
🔔 5th Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
🔔 6th Reminder Hey @tankyleo! This PR has been waiting for your review. |
|
🔔 7th Reminder Hey @tankyleo! This PR has been waiting for your review. |
Have added in_memory store for testing purpose.
We can edit config file to use specific store either postgresql or memory